GXGetPolygons
You can use theGXGetPolygons
function to determine the geometry of a polygon shape.
long GXGetPolygons(gxShape source, gxPolygons *data);
source
- A reference to the polygon shape whose geometry you want to determine.
data
- A pointer to a
gxPolygons
data structure. The function copies the source shape's geometry into this structure.- function result
- The length in bytes of the source shape's geometry.
DESCRIPTION
TheGXGetPolygons
function copies the geometry information from the source polygon shape into thegxPolygons
structure pointed to by thedata
parameter. As the function result, this function returns the length in bytes of the polygon geometry.If the source shape is not a polygon shape, this function posts the error code
illegal_type_for_shape
.You may pass
nil
for thedata
parameter. In this case, theGXGetPolygons
function still returns the length of the data as the function result, but it does not return the actual data in thedata
parameter.Typically, to use this function, you go through the following steps:
- Determine the length of the polygon data by calling this function, passing
nil
for thedata
parameter.- Allocate enough memory to hold the polygon data.
- Call this function again, passing a pointer to the allocated memory in the
data
parameter.
ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory shape_is_nil illegal_type_for_shape
(debugging version) SEE ALSO
For general information about polygon geometries, see "Polygon Shapes" on page 2-22.For the definition of the
gxPolygons
structure, see page 2-106.To create a new polygons shape, use the
GXNewPolygons
function, which is described on page 2-116.To change the geometry of an existing polygon shape, use the
GXSetPolygons
function, which is described in the next section.To draw a polygon geometry without creating a polygon shape, use the
GXDrawPolygons
function, which is described on page 2-161. To draw a polygons shape, use theGXDrawShape
function, which is described in the chapter "Shape Objects" in Inside Macintosh: QuickDraw GX Objects.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help